The present invention relates to a method and a device for focusing an electrical signal representative of an optical code. The invention may advantageously be used in an optical code reader.
In the present description and following claims, the expression xe2x80x9coptical codexe2x80x9d indicates any graphical representation having the function of storing a coded information. A particular example of optical code consists of linear or bidimensional codes, wherein the information is coded through suitable combinations of elements having predetermined shape, such as for example square, rectangular or hexagonal, dark-coloured (usually black) separated by light elements (spaces, usually white), such as bar codes, stacked codes and bidimensional codes in general, colour codes, etc. The expression xe2x80x9coptical codexe2x80x9d also comprises, more in general, other graphic shapes with the function of coding information, including light printed characters (letters, numbers, etc.) and particular patterns (such as for example, stamps, logos, signatures, fingerprints etc.). The expression xe2x80x9coptical codexe2x80x9d also comprises graphical representations detectable not only in the field of visible light, but also in the wavelength range comprised between infrared and ultraviolet.
By way of an example and for the purpose of making the following description clearer, explicit reference shall be made to a barcode reader; of course, a man skilled in the art will recognise that what said is applicable to different types of optical code readers, such as those indicated above.
Typically, an optical code reader, schematically illustrated in FIG. 1 and indicated with reference numeral 1, comprises an illumination unit 2, adapted to emit a luminous beam towards the support containing the optical code 3 to be read, and an opto-electric reception unit 4, adapted to collect the luminous signal diffused by the illuminated optical code. In particular, such luminous signal is collected, through an optical reception system, on suitable photo-receiving means, which convert the luminous signal into an electrical signal.
The following processing for reading the optical code can occur directly on the electrical signal, or before such successive processing, the electrical signal can be pre-processed by a pre-processing unit 5, which can comprise amplifying means and/or other means adapted to suitably change the electrical signal for the particular application. Then the electrical signal, pre-processed or not, is sent to a digitising and decoding unit 6, so as to extract its information content.
The digitising and decoding unit 6 includes a un digitiser and a decoder, not shown, which respectively have the purpose of digitising the received electrical signal, transforming it into a succession of digital pulses, and of extracting the coded information from the optical code, providing it in output in a form usable by processing devices connected downstream, or to displaying devices.
In a typical embodiment of a conventional reader, the illumination unit 2 comprises a luminous source, consisting of one or more LEDs and/or one or more diaphragms, and one or more focusing lenses, which focus the emitted luminous beam.
As an alternative, the luminous source can consist of one or more lasers, and the illumination unit 2 can comprise, besides the lens and/or the diaphragm, further scan means (for example, an oscillating mirror or a polygonal mirror rotor) for generating one or more scan lines of the luminous beam on the optical code.
Besides the photo-receiving means, the opto-electric reception unit 4 typically comprises one or more lenses and/or diaphragms adapted to collect the light beam diffused by the optical code and focus it.
In the following description, the expression xe2x80x9creceiving opticsxe2x80x9d shall be used to indicate all of the lenses and/or diaphragms contained in the opto-electric reception unit 4 adapted to collect the light diffused by the optical code.
The photo-receiving means can consist of a linear or matrix sensor, for example a CCD (Charged Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor), or of a photodiode.
Reader 1 can be of the fixed or portable type, and it is associated with a depth of field that is definable as the range of optical code-reader distances in which the reader reads correctly.
In all of the above-mentioned types of readers, an analogue signal is obtained at the output of the photo-receiving means, which is an electrical signal reproducing the reflectance modulations of the elements forming the optical code along a scan line of the same code. In fact, the light with which the optical code is illuminated is absorbed by the bars and reflected by the spaces. Thus, the analogue signal has an alternate pattern, with relative maximums (called peaks in the following description) at the spaces, relative minimums (called valleys in the following description) at the bars, and leading and trailing fronts at the transitions between bars and spaces, and vice versa, as illustrated in FIG. 2.
In the following description, also the expression xe2x80x9cnegative peakxe2x80x9d shall be used, where appropriate, to indicate a valley of the analogue signal, whereas a peak of the analogue signal may also be indicated with the expression xe2x80x9cpositive peakxe2x80x9d.
Moreover, the analogue signal comprises a frequency band containing all the information relating to the detected optical code. The frequency band can be very variable, since it depends on various factors among which the print resolution of the optical code, the reader-optical code distance, and the properties of the photo-receiving means. For example, for a high-depth of field CCD reader, the frequency band can be comprised between 100 Hz and 50 KHz.
To allow a correct reading of the optical code, the analogue signal in input to the digitising and decoding unit 6 must reproduce as accurately as possible the alternation of the code bars and spaces, that is, it must exhibit minimum alteration with respect to the ideal alternate pattern.
In fact, the alteration of the analogue signal can cause errors during the digitisation, thus impairing the successive decoding. In particular, the analogue signal alteration mainly concerns the following factors:
1) amplitude of the analogue signal and relevant dynamics
2) signal/noise ratio (SNR) associated to the same analogue signal.
With reference to item 1), the analogue signal amplitude can be too little to allow, during digitisation, the recognition of some elements of the optical code. Typically, a high resolution or a low contrast of the optical code can be the causes of an analogue signal in which peaks and valleys are not very marked.
With reference to item 2), noise can be of electronic nature, due to the components of the reader, and of ambient nature, due for example to fluctuations in the illumination of the optical code. Noise introduces high-frequency portions in the analogue signal, and during digitisation and decoding, this may cause peaks and/or valleys due to noise and not to the optical code to be recognised as elements of the optical code.
A parameter of the xe2x80x9cgood qualityxe2x80x9d of the analogue signal is its focusing. In the case of a barcode reader, xe2x80x9cfocusingxe2x80x9d refers to the ratio between the peak-valley amplitudes of the analogue signal of narrow elements, and the peak-valley amplitudes of the analogue signal of wide elements of the barcode, where elements indicates both a bar and a space. To this purpose, reference shall be made to FIG. 2, showing the temporal pattern of an analogue signal relating to a fragment of barcode, wherein Vp1 indicates the peak value relating to a wide space, Vp2 indicates the valley value relating to a wide bar, Vp3 indicates the peak value relating to a narrow space, and Vp4 indicates the valley value relating to a narrow band. By indicating with Vppw the peak-valley amplitude relating to the wide elements of the barcode (Vp1-Vp2) and with Vppn the peak-valley amplitude relating to the narrow elements of the barcode (Vp3-Vp4), focusing F is defined by the non-dimensional quantity:                     F        =                              V            ppn                                V            ppw                                              (        1        )            
In general, the value of F (always xe2x89xa61) is variable into the barcode.
In a laser light reader (or laser scanner) with oscillating mirror or with polygonal mirror rotor), the analogue signal focusing is determined by the size and shape of the spot that scans the same optical code (besides, of course, the print resolution). The spot size depends on the reading distance and on the optics used for generating emission laser beam.
In a linear CCD reader without moving mechanical parts, the focusing is determined by the receiving optics (lens and diaphragm), by the optical code distance and by its print resolution.
Also in an optical pen (contact reader with manual scan) or in a slot reader of the fixed type, with manual scan and very limited depth of field, the focusing is determined by the optical code distance, by the print resolution and by the receiving optics.
From experimental measures, it is possible to define an analogue signal having F≅0.7 as correctly focused. Signals with Fxe2x89xa60.5 usually generate a digitised signal with some element having incorrect size and/or position; with values of Fxe2x89xa60.35 it is already possible to have the loss of some element in the digitised signal. In fact, the analogue signal with low focusing typically exhibits a strongly altered pattern, since the peaks identifying the narrowest spaces are lowered, and the valleys identifying the narrowest bars of the code are lifted. During digitisation, this can cause the wrong evaluation of elements, or even the loss of some narrow element and, in the successive decoding step, a wrong calculation of bars and spaces.
An excessive focusing (Fxe2x89xa70.85) can equally cause problems, since print and support imperfections and defects are too emphasised (probable addition of spurious elements on the digitised signal).
Known solutions for obtaining a good focusing of the analogue signal provide for acting on the illumination and/or receiving optics, that is, varying the focusing lens position (for example, with an auto-focus system).
However, said solutions imply an increase of the complexity of the optics, the use of moving mechanical parts, thus causing an increase of the costs of readers and a lower reliability of the same.
Other solutions are known, that improve the focusing of the analogue signal present at the digitiser input without acting on the optics.
Such solutions amplify the portions of analogue signal having reduced amplitude, but they introduce distortions in the amplified analogue signal.
In the following description, the expression xe2x80x9canalogue signal distortionxe2x80x9d indicates the shift introduced on the relative peak and valley positions with respect to their original relative position in the initial analogue signal, that is, that extracted from the photo-receiving means.
Thus, in conclusion, in known solutions, the increase of the focusing of the analogue signal is xe2x80x9cpaidxe2x80x9d with the introduction of an error in the position of peaks and valleys of the focused analogue signal that reflects on the digitised signal and thus, on the decoding result.
Thus, purpose of the invention is that of improving the focusing of the analogue signal present at the output of the opto-electric reception unit 4 of readers of any type, limiting the additional distortion in the analogue signal.
In particular, the expression xe2x80x9cimproving the focusingxe2x80x9d indicates both increasing the focusing value, and decreasing such value so as to obtain an optimum focusing value.
In fact, as already said, a very high focusing of the analogue signal (typically F greater than 0.85) can cause decoding errors; in such specific case, the improvement object of the present invention is directed at decreasing the focusing value.
A further purpose of the invention is that of improving the analogue signal focusing maintaining a high signal/noise ratio.
Another purpose of the invention is that of increasing the depth of field of the reader by acting only electronically, but with a similar effect to that obtainable through the mechanical adjustment of the illumination and/or receiving optics.
In the following description and claims, the expression xe2x80x9canalogue signal focusingxe2x80x9d indicates the operation of improving the analogue signal focusing, defined according to (1). Moreover, the term xe2x80x9cfocusingxe2x80x9d shall be also used for indicating the value defined by (1).
According to the present invention, a method for focusing an analogue electrical signal (si; si(n)) is realised, such analogue electrical signal being representative of an optical code and exhibiting frequency band and amplitudes correlated to the information content of the optical code, characterised in that it comprises the steps of selectively emphasizing with linear phase portions of said analogue electrical signal (si; si(n)) having predetermined features, and of generating a focused analogue electrical signal (so; so(n))
According to this solution, the focusing is carried out by selectively emphasizing with linear phase the analogue signal high-frequency portions.
According to another solution of the invention, the focusing is carried out by selectively emphasizing with linear phase the analogue signal high-frequency portions obtained by filtering out low-frequency portions, and adding emphasized high-frequency portions to the suitably delayed analogue signal.
According to another solution, before being respectively emphasized and delayed, the analogue signal is filtered with linear phase so as to let substantially all the frequencies of the frequency band pass.
According to a further solution of the invention, for maintaining the focusing substantially constant as the optical code-reader distance changes, the emphasizing of the analogue signal high-frequency portions may be controlled. According to a variant of such solutions, emphasizing is manually controllable. According to another variant, emphasis is automatically controllable through a multiple selection of a parameter or of an emphasizing function. According to another variant, emphasis is automatically controllable through a system that measures the focusing value of the analogue signal and changes the parameter or the emphasizing function on the basis of the measured focusing value.
Moreover, the invention relates to a device for focusing an analogue electrical signal (si; si(n)) representative of an optical code and exhibiting frequency band and amplitudes correlated to the information content of the optical code, characterised in that it comprises linear phase emphasizing means (7; 8; 12; 12xe2x80x2) which selectively emphasize portions of said analogue electrical signal having predetermined features (si; si(n)) and generate a focused analogue electrical signal (so; so(n))
According to this solution, the focusing unit comprises a linear phase filter which provides, in output, an analogue signal whose high-frequency portions are emphasized.
According to another solution, the focusing unit comprises a linear phase filter of the high-pass type and an analogue multiplier that provide an emphasized high-frequency analogue signal in output, having a fixed group delay with respect to the input analogue signal; moreover, the focusing unit comprises a delay line that delays the analogue signal, introducing a delay equal to the group delay of the emphasized high-frequency analogue signal, and a node that sums the emphasized high-frequency analogue signal to the delayed and the delayed analogue signal.
According to another solution, the focusing unit comprises a low-pass linear phase filter upstream of the high-pass filter and of the delay line.
According to a solution of the invention, the analogue multiplier allows adjusting the focusing in function of the distance between the optical code and the reader, and of other variable conditions.
According to yet another solution, the adjustment is performed manually. According to another solution, the adjustment automatically occurs through a system for measuring the focusing value of the analogue signal or of the focused analogue signal, with a feedback or direct action control.
Further features of the invention will appear more clearly from the description of some preferred embodiments, provided by way of a non-limiting example and illustrated in the attached drawings. In such drawings:
FIG. 1 shows a block diagram of a know n optical code reader;
FIG. 2 shows the temporal pattern of an analogue signal at the output of the opto-electric reception unit 4 of the reader of FIG. 1;
FIGS. 3a, 3b and 3c show Bode diagrams relating to an embodiment of the invention;
FIG. 4a shows a block diagram of the invention;
FIG. 4b shows a block diagram of a first embodiment of the invention;
FIG. 4c shows a block diagram of a second embodiment of the invention;
FIG. 4d shows a block diagram of a third embodiment of the invention;
FIG. 5 shows a circuit diagram of a block of FIG. 4d;
FIG. 6 shows a Bode diagram relating to a block of FIG. 4d; 
FIG. 7 shows different temporal patterns of the analogue signal, obtained for different focusing values;
FIG. 8 shows the pattern of an analogue signal and of the respective analogue signal focused with the method according to the invention;
FIG. 9 shows a block diagram of a further embodiment of the invention;
FIG. 10 shows a circuit diagram of the block diagram of FIG. 9;
FIG. 11 shows a block diagram of a further embodiment of the invention;
FIG. 12 shows a more detailed diagram of the block diagram of FIG. 11;
FIGS. 13 and 14 show a circuit diagram of some blocks of FIG. 12;
FIG. 15 shows a block diagram of a further embodiment of the invention;
FIG. 16 shows a block diagram of a further embodiment of the invention;
FIG. 17 shows a more detailed diagram of a block of FIGS. 15 and 16; and
FIGS. 18a, 18b and 18c show the pattern of some signals of the diagram of FIG. 17.